package com.aaa.hospital.ManagementEnd.controller;


import com.aaa.hospital.ManagementEnd.service.ResetPasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/ResetPwd")
public class ResetPasswordController {

    @Autowired
    private ResetPasswordService passwordService;


@RequestMapping("/verification")
@ResponseBody
public boolean verification(Integer uid ,String idcard){
    boolean verification = passwordService.verification(uid, idcard);
    return verification;
}

    @RequestMapping("/resetpassword")
    @ResponseBody
    public boolean resetpassword(Integer uid ,String idcard,String password){
        boolean verification = passwordService.reset_password(uid, idcard, password);
        return verification;
    }


}
